package com.byjk.ai.service;


import lombok.RequiredArgsConstructor;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.stereotype.Service;


@RequiredArgsConstructor
@Service
public class ChatService {

    private final ChatClient chatClient;


    public String chat(String prompt) {
        String content = chatClient.prompt()
                .user(prompt)
                .call()
                .content();
        return content;

    }
}
